package org.wangwei.worker;

import java.util.concurrent.Future;

public abstract class WorkerTask<T> implements Future<T> {
	
	protected String taskId;
	protected boolean done = false;
	protected int priority;
	
	public WorkerTask(int priority){
		taskId = SimpleTaskIdGenerator.genTaskId();
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public boolean isDone() {
		return done;
	}

	public void setDone(boolean done) {
		this.done = done;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}
	
	
}
